home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
CUGUK
/
PC_LIBS
/
C044.ZIP
/
ATIVGA.ZIP
/
SIMPOBJ.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1989-08-13
|
1KB
|
37 lines
{ Demonstrates: Registering the BGI file in the executable. }
{ Super VGA BGI graphics driver demo }
{ Thomas Design }
{ August 7, 1989 }
{ Test routine }
uses
Graph,crt,ATIDET,VGAEXTRA;
var
Gd, Gm : integer;
count : integer;
DAC : RGB; { define the DAC array (type in TPU) }
begin
Gd := InstallUserDriver('ATI256',@_DetectATI256); { must say gd := Install... to work }
gd := registerbgidriver(@_ATIDRIVERPROC);
Gd := DETECT;
InitGraph(Gd, gm ,'');
DAC[0][0] := 0; { Demonstrate how to use dacpalette}
DAC[0][1] := 0;
DAC[0][2] := 0;
for count := 1 to 255 do begin
DAC[count][0] := random($3f);
DAC[count][1] := random($3f);
DAC[count][2] := random($3f);
end;
dacpalette(DAC); { load the DAC registers from array }
for Count := 1 to 2000 do begin { Test the graphics mode }
SetColor(random(255));
line(getmaxx div 2,getmaxy div 2,random(getmaxx),random(getmaxy));
end;
restorecrtmode;
end.